#pragma once
#include "XmlAttribute.h"
#include <vector>


//We can return the vector of attributes within a node.
//Typedeffing this as a vector greatly simplifies things and allows us to use
//C++ 11 move semantics as well as all the iterator functionality of std::vector.
typedef std::vector<xmlattribute> xmlattributes;


//XXX The following is not needed, it was there from when we were trying out iterators.

// This class serves an an abstraction to the 
// collection of xml attributes and can act
// as a base class to implement more specific
// user defined collections for xmlattribute class.


/*
class xmlattribute;
class xml_document;

class xmlattributes
{
public:

	// Constructors
	xmlattributes():attributes(0) { }

	// These can be used by the client to point to some 
	// xmlnode collection created by him.We do not use 
	// however to avoid the leakage of internal data out
	// of our API.
	class iterator :
		public std::iterator<std::random_access_iterator_tag, const xmlattribute> {
		// TODO : define all the iterator methods here
	 };

	// We will have only constant iterators so that the 
	// client does not possibly screw up with our internal 
	// attribute objects.
	class const_iterator : public
	   std::iterator<std::random_access_iterator_tag, const xmlattribute> {
		   
	 };

	// Returns the iterator pointing to the beginning
	// element of the xmlattributes collection.
	const_iterator begin();
	
	
	// Returns the iterator pointing to the last
	// node of the xmlattributes collection.
	const_iterator end();
	
	//Returns the size
	size_t size() { return attributes.size(); }

	xmlattribute & operator[]( int i ) { 
		return attributes[i];
	}

protected:
	friend xml_document;
	void add_attribute(const xmlattribute & attribute);

private:
	vector<xmlattribute> attributes;
};
 */
